{extend name="base" /}
{block name="title"}公众号{/block}

{block name="main"}
<div class="zbd-main">
	<div class="page">
		<div class="box">
		    <div class="box-content">
		    	<a href="/programs?type=" class="pla_type {$param['type'] == '' ? 'plted' : ''}">全部分类</a>
		    	{foreach $arrs['type_list'] as $key => $val}
		    	<a href="/programs?type={$val['type']}" class="pla_type {$val['type'] == $param['type'] ? 'plted' : ''}">{$val['type']}</a>
		    	{/foreach}
		    </div>
		</div>

		<div class="row mt20">
			<div class="w9">
				<div class="box">
		        	<div class="box-title">
						<div class="left small black">
							<span class="red">[{$param['type'] ? $param['type'] : '全部'}]</span>
							小程序大全
						</div>
					</div>
				    <div class="box-content">
				    	<div class="row">
				    		{foreach $arrs['list']['rows'] as $key => $val}
				    		<div class="w3 ws4">
						        <div class="gzh-item">
						        	<div class="item">
						        		<div class="image">
						        			<a href="/programs/info?id={$val['id']}">
						        				<img src="{$val['avatar']}" alt="{$val['name']}" title="{$val['name']}">
						        			</a>
						        		</div>
						        		<div class="info">
						        			<div class="name el">
						        				<a href="/programs/info?id={$val['id']}" title="{$val['name']}" class="black">{$val['name']}</a>
						        			</div>
						        			<div class="business">
						        				<div class="type-name">
						        					<span class="layui-badge bg-blue">{$val['type']}</span>
						        				</div>
						        				<div class="views">
						        					<img class="icon-svg" src="/iceui/img/hot.svg">
						        					{$val['views']}
						        				</div>
						        			</div>
						        		</div>
						        	</div>
						        	<div class="gray2 small min-desc" title="{$val['content']}">{$val['content']}</div>
						        </div>
						    </div>
						    {/foreach}
				    	</div>

				    	<div class="fengye">
				    		<div class="paging" id="paging-1"></div>
				    	</div>

				    </div>
				</div>
			</div>
			<div class="w3">
		    	<div class="box">
		    		<div class="zbd-sign">
		    			<div class="row">
		    				<div class="w4">
		    					<div class="qiandao icon ice-calendar cursor-pointer" title="立刻签到"> 签到</div>
		    				</div>
		    				<div class="w8">
		    					<div class="qd-info">
		    						<div class="qd-col">
		    							<span class="small block qd-tip bdx"><i class="icon ice-user-chart smallicon"></i> 219 人</span>
		    							<span class="small block qd-tip"><i class="icon ice-time smallicon"></i> 签到信息</span>
		    						</div>
		    						<div class="qd-col text-center">
		    							<span class="small block qd-tip">星期一</span>
		    							<span class="small block qd-tip">06月09日</span>
		    						</div>
		    					</div>
		    				</div>
		    			</div>
		    		</div>
		    	</div>

		        <div class="box mt20">
		        	<div class="box-title">
						<div class="left small black"><i class="icon ice-time"></i> 热门小程序</div>
					</div>
			    	<div class="box-content">
				    	<div class="item-list">
				    		{foreach $arrs['new_programs'] as $key => $val}
				    		<div class="item">
				    			<div class="img91622">
				    				<a href="/programs/info?id={$val['id']}" title="{$val['name']}">
				    					<img src="{$val['qrcode']}" class="img91622" alt="{$val['name']}">
				    				</a>
				    			</div>
				    			<div class="info">
				    				<div class="black">
				    					<a href="/programs/info?id={$val['id']}" title="{$val['name']}" class="black">{$val['name']}</a>
				    				</div>
				    				<div class="ddesc">{$val['content']}
				    				</div>
				    			</div>
				    		</div>
				    		{/foreach}
				    	</div>
				    </div>
				</div>
		    </div>
		</div>
	</div>
</div>
{/block}

{block name="js"}
<script>
	ice.paging({
		id: 'paging-1',
		count: {$arrs['list']['total']},
		size: {$arrs['list']['pageSize']},
		page: {$arrs['list']['page']},
		callback(num) {
			var t = ice.getUrl('type');
			var type = t ? t : '';
			window.location.href = '/programs?page=' + num + '&type=' + type;
		}
	})
</script>
{/block}